<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns:ui="http://java.sun.com/jsf/facelets"
                template="/publico/template/templatePadrao.xhtml"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:p="http://primefaces.org/ui"
                xmlns:f="http://java.sun.com/jsf/core">

    <ui:define name="content">

        <h:form>
            <p:panel id="panelPeriodico">
                <p:growl showDetail="true" showSummary="true"/>
                
                <p:dataTable 
                    id="listaPeriodicosA"
                    value="#{avaliacaoBean.periodicosParaAvaliar}"
                    var="lperiodico" 
                    emptyMessage="Sem registro para a exibição.">

                    <f:facet name="header">
                        Periodicos
                    </f:facet>

                    <p:column headerText="Título" > 
                        <h:outputLabel value="#{lperiodico.titulo}"/>
                    </p:column>  

                    <p:column headerText="Revista" > 
                        <h:outputLabel value="#{lperiodico.revista}"/>
                    </p:column>  

                    <p:column headerText="Pontuação Invio" > 
                        <div align="center">
                            <h:outputLabel value="#{lperiodico.estrato}"/>  
                        </div>
                    </p:column> 

                    <p:column headerText="Pontuação Comitê">
                        <div align="center">
                            <p:selectOneMenu value="#{lperiodico.estrato}">  
                                <f:selectItem itemLabel="50" itemValue="50" />  
                                <f:selectItem itemLabel="45" itemValue="45" />  
                                <f:selectItem itemLabel="40" itemValue="40" />  
                                <f:selectItem itemLabel="30" itemValue="30" />  
                                <f:selectItem itemLabel="25" itemValue="25" />  
                                <f:selectItem itemLabel="20" itemValue="20" />  
                                <f:selectItem itemLabel="10" itemValue="10" />  
                                <f:selectItem itemLabel="5" itemValue="5" />  
                                <f:selectItem itemLabel="0" itemValue="0" />  
                            </p:selectOneMenu>  
                        </div>
                    </p:column>

                    <p:column headerText="Conferência">
                        <div align="center">
                            <p:commandButton
                                value="OK"
                                action="#{avaliacaoBean.avaliarPeriodico()}" >
                            </p:commandButton>
                        </div>
                    </p:column>
                </p:dataTable>
            </p:panel>

            <p:panel id="panelLivro">
                <p:dataTable
                    id="listaLivros"
                    value="#{avaliacaoBean.livrosParaAvaliar}"
                    var="lislivro"
                    emptyMessage="Sem registros para a exibição">

                    <f:facet name="header">
                        Livros
                    </f:facet>

                    <p:column headerText="Titulo">
                        <h:outputLabel value="#{lislivro.titulo}"/> 
                    </p:column>

                    <p:column headerText="Capítulo"> 
                        <h:outputLabel value="#{lislivro.capitulo}"/> 
                    </p:column>

                    <p:column headerText="Ano"> 
                        <div align="center">
                            <h:outputLabel value="#{lislivro.ano}"/> 
                        </div>
                    </p:column>

                    <p:column headerText="Pontuação Invio">
                        <div align="center">
                            <h:outputLabel value="#{lislivro.estrato}"/>
                        </div>
                    </p:column>

                    <p:column headerText="Pontuação Comitê">
                        <div align="center">
                            <p:selectOneMenu value="#{avaliacaoBean.estratoTemp}">  
                                <f:selectItem itemLabel="30" itemValue="30" />  
                                <f:selectItem itemLabel="20" itemValue="20" />  
                                <f:selectItem itemLabel="10" itemValue="10" />
                                <f:selectItem itemLabel="0" itemValue="0" />
                            </p:selectOneMenu>  
                        </div>
                    </p:column>

                    <p:column headerText="Conferência">
                        <div align="center">
                            <p:commandButton
                                value="OK"
                                action="#{avaliacaoBean.avaliarLivro()}" >
                            </p:commandButton>
                        </div>
                    </p:column>
                </p:dataTable>
            </p:panel>

            <p:panel id="panelOrientacao">
                <p:dataTable
                    id="listaOrientacao"
                    value="#{avaliacaoBean.orientacoesParaAvaliar}"
                    var="lisorientacao"
                    emptyMessage="Sem registros para a exibição">

                    <f:facet name="header">
                        Orientações
                    </f:facet>

                    <p:column headerText="Aluno">
                        <h:outputLabel value="#{lisorientacao.aluno}"/> 
                    </p:column>

                    <p:column headerText="Fim"> 
                        <h:outputLabel value="#{lisorientacao.PFinal}"/> 
                    </p:column>

                    <p:column headerText="Pontuação Invio"> 
                        <div align="center">
                            <h:outputLabel value="#{lisorientacao.estrato}"/> 
                        </div>
                    </p:column>

                    <p:column headerText="Pontuação Comitê">
                        <div align="center">
                            <p:selectOneMenu value="#{lisorientacao.estrato}">  
                                <f:selectItem itemLabel="8" itemValue="8" />  
                                <f:selectItem itemLabel="4" itemValue="4" />  
                                <f:selectItem itemLabel="2" itemValue="2" />  
                                <f:selectItem itemLabel="0" itemValue="0" />  
                            </p:selectOneMenu>  
                        </div>
                    </p:column>

                    <p:column headerText="Conferência">
                        <div align="center">
                            <p:commandButton
                                value="OK"
                                action="#{avaliacaoBean.avaliarOrientacao()}" >
                            </p:commandButton>
                        </div>
                    </p:column>
                </p:dataTable>
            </p:panel>
        </h:form>
    </ui:define>
</ui:composition>